<template>
  <div class="open-container" @click="onSetClickBoard">
    <u-icon name="github-circle-fill" color="#2c3e50" size="84"></u-icon>
    <div class="u-m-l-32">
      <div class="u-font-xl u-main-color">源代码已开源</div>
      <div class="u-font-sm u-content-color">点击可查看源代码地址</div>
    </div>

    <u-toast ref="uToast" />
  </div>
</template>

<script>
export default {
  methods: {
    onSetClickBoard() {
      let self = this
      uni.setClipboardData({
        data: "https://gitee.com/github-31064550/uni_app-question.git",
        success: function () {
          self.$refs.uToast.show({
            title: "已复制代码Gitee开源地址啦, 给个Star呗",
            type: "success",
            position: "bottom",
          })
        },
      })
    },
  },
}
</script>

<style lang="scss" scoped>
.open-container {
  display: flex;

  position: absolute;
  bottom: 42rpx;

  border-radius: 50rpx;
  padding: 24rpx 32rpx;

  background: #ecf0f3;

  box-shadow: 9px 9px 14px #c7c7cb, -9px -9px 14px #ffffff;
}
</style>
